package smurf.view;

import java.awt.Graphics;
import java.awt.SystemColor;

/**
 * StatusPanel draws the application status bar that is used to display application messages
 * 
 * @author Bishan Kumar Madhoo <bishan.madhoo@idsoft.mu>
 * @version 1.0
 */
public class StatusPanel extends javax.swing.JPanel {
    
    /**
     * Creates new form StatusPanel
     */
    public StatusPanel() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
     * content of this method is always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        statusLabel = new javax.swing.JLabel();

        setFocusable(false);
        setMaximumSize(new java.awt.Dimension(2147483647, 26));
        setMinimumSize(new java.awt.Dimension(10, 26));
        setPreferredSize(new java.awt.Dimension(821, 26));
        setLayout(new java.awt.BorderLayout());

        statusLabel.setText("SMURF, un composant de la communauté SEPAmail");
        statusLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 8, 3, 8));
        add(statusLabel, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JLabel statusLabel;
    // End of variables declaration//GEN-END:variables

    /**
     * Draw a horizontal line at the top of the status bar
     * 
     * @param g Graphics layer
     */
    @Override
    public void paintComponent(Graphics g) {

        // Call the paintComponent method of the super class
        super.paintComponent(g);

        // Set the pen colour
        g.setColor(SystemColor.inactiveCaptionBorder);

        // Draw horizontal line
        g.drawLine(0, 0, this.getWidth(), 0);
    }
}
